Matthias Clasen [Tue, 8 Dec 2015 02:52:51 +0000 (21:52 -0500)]
x11: Implement gdk_drag_context_set_hotspot
This makes the drag behavior under X11 match what we had previously.
Matthias Clasen [Tue, 8 Dec 2015 02:52:03 +0000 (21:52 -0500)]
gdk: Add api to set drag window hotspot
With GdkDragContext now being in charge of placing the window,
it needs to know about the hotspot to place under the cursor.
Matthias Clasen [Mon, 7 Dec 2015 23:32:57 +0000 (18:32 -0500)]
dnd: Remove an unused struct field
We only have one screen nowadays, so the fallback_icon is
never used.
Carlos Garnacho [Mon, 7 Dec 2015 15:32:15 +0000 (16:32 +0100)]
GtkNotebook: Use gdouble in coordinate calculations
Otherwise rounding errors fool the "tab under coordinates" checks on
crossing events, which will be triggered close enough to the window
rectangle if the pointer moves slowly enough.
With this, the tab_prelight() function correctly figures out we've
moved the pointer outside the tab area when called in
gtk_notebook_leave_notify().
https://bugzilla.gnome.org/show_bug.cgi?id=759091
Adam Reichold [Sun, 6 Dec 2015 10:30:58 +0000 (11:30 +0100)]
Fix method to update menu sensitivity of combo box
After removal of the selectable header and separator from the combo box,
the method to update the menu sensitivity must be changed as it assumes
at least two items within each sub menu and contains special handling
for the separator. Removing this fixes bug #759079.
Matthias Clasen [Mon, 7 Dec 2015 15:11:06 +0000 (10:11 -0500)]
Avoid ugly seams on half-tiled terminals
Since we're no longer doing geometry widgets, don't send
base size and increments to the window manager anymore either.
This avoids an ugly 2 pixel gap to the right and bottom of half-tiled
terminals under gnome-shell.
Matthias Clasen [Mon, 7 Dec 2015 12:04:43 +0000 (07:04 -0500)]
accel cellrenderer: Fix rendering
We were getting the "New Accelerator" text mixed with the
content of the underlying cell, since plain labels don't
have a background. Go back to putting the label in selected
state, and fix the theme to render that white-on-blue. This
was lost when we switched to using a selection sub-node.
Erika [Sun, 6 Dec 2015 14:31:00 +0000 (14:31 +0000)]
Correct annotations for gtk_cell_layout_get_area
The function can return NULL.
https://bugzilla.gnome.org/show_bug.cgi?id=759081
Matthias Clasen [Mon, 7 Dec 2015 04:06:33 +0000 (23:06 -0500)]
inspector: Redo the CSS node page
Showing two lists in a paned was a bit awkward, and space was
getting too limited. Go back to showing just the node list at
first, and make the CSS properties available via a stack. At
the same time, add a right-click context menu to the node list
to make the name and class editing more easily available.
Matthias Clasen [Sun, 6 Dec 2015 22:25:31 +0000 (17:25 -0500)]
inspector: Avoid a crash
gkt_cell_layout_get_area may return NULL, handle it.
Matthias Clasen [Sun, 6 Dec 2015 20:40:59 +0000 (15:40 -0500)]
css node: Some more docs
Matthias Clasen [Sun, 6 Dec 2015 00:18:27 +0000 (19:18 -0500)]
places view: Use names for cursors
Use the standard name for the busy+interactive cursor.
Matthias Clasen [Sun, 6 Dec 2015 00:17:52 +0000 (19:17 -0500)]
entry: Always use cursor names
The names are the preferred API for cursors, so use it.
Matthias Clasen [Sun, 6 Dec 2015 00:09:17 +0000 (19:09 -0500)]
Add a test for required cursors
We use these cursors in GTK+, so check for their existence.
Matthias Clasen [Sat, 5 Dec 2015 23:55:05 +0000 (18:55 -0500)]
Be forgiving if cursors are missing
No need to crash here. Missing cursors are ugly, but we
shouldn't crash.
Matthias Clasen [Sat, 5 Dec 2015 22:09:10 +0000 (17:09 -0500)]
Add more examples to foreigndrawing
Show how to draw checks and radios.
Dušan Kazik [Sat, 5 Dec 2015 19:38:36 +0000 (19:38 +0000)]
Updated Slovak translation
Matthias Clasen [Sat, 5 Dec 2015 19:12:27 +0000 (14:12 -0500)]
entry completion: Reduce the timeout
Pop up the completion window after 100ms. The previous timeout
of 300ms was making completions feel slow.
https://bugzilla.gnome.org/show_bug.cgi?id=758929
Matthias Clasen [Sat, 5 Dec 2015 19:11:06 +0000 (14:11 -0500)]
widget-factory: Add an entry completion
This was missing so far.
Matthias Clasen [Sat, 5 Dec 2015 18:52:09 +0000 (13:52 -0500)]
shortcuts: Another attempt to fix up forall
gtk_window_set_titlebar does not take ownership of the headerbar,
so we need to explicitly destroy it.
Matthias Clasen [Sat, 5 Dec 2015 18:50:26 +0000 (13:50 -0500)]
gtk-demo: Plug a memory leak
Piotr Drąg [Sat, 5 Dec 2015 18:27:32 +0000 (19:27 +0100)]
Updated POTFILES.in
Matthias Clasen [Sat, 5 Dec 2015 17:09:16 +0000 (12:09 -0500)]
Remove GtkShortcutsGesture
The gesture functionality was taken over by GtkShortcutsShortcut,
so this widget is no longer needed, and it never was in a stable
release, so lets get rid of it.
Lapo Calamandrei [Sat, 5 Dec 2015 16:55:38 +0000 (17:55 +0100)]
Adwaita: simpler active switch background
...removing the progressbar_fill mixin in the process.
Lapo Calamandrei [Sat, 5 Dec 2015 16:52:37 +0000 (17:52 +0100)]
Adwaita: first stab at some visual updates
Piotr Drąg [Sat, 5 Dec 2015 14:28:17 +0000 (15:28 +0100)]
Updated Polish translation
Wolfgang Stöggl [Sat, 5 Dec 2015 12:18:51 +0000 (12:18 +0000)]
Updated German translation
Pedro Albuquerque [Sat, 5 Dec 2015 07:48:40 +0000 (07:48 +0000)]
Updated Portuguese translation
Pedro Albuquerque [Sat, 5 Dec 2015 07:46:31 +0000 (07:46 +0000)]
Updated Portuguese translation
Matthias Clasen [Fri, 4 Dec 2015 16:29:27 +0000 (11:29 -0500)]
3.19.4
Matthias Clasen [Fri, 4 Dec 2015 21:59:29 +0000 (16:59 -0500)]
Fix make check
GtkFontChooserWidget is using a GThemedIcon in its template,
so we need to ensure that the type is registered before
loading it. This was causing the defaultvalue test to fail.
Lionel Landwerlin [Fri, 4 Dec 2015 21:02:36 +0000 (21:02 +0000)]
adwaita: fix property spelling mistake
https://bugzilla.gnome.org/show_bug.cgi?id=759048
Timm Bäder [Fri, 4 Dec 2015 19:38:31 +0000 (20:38 +0100)]
GtkEntry: Recompute in text-inserted/text-deleted
The text-inserted/text-deleted handlers rely on the cursor positions
being unadjusted after the text change, so we can't do it in
buffer_notify_text.
Matthias Clasen [Fri, 4 Dec 2015 18:17:37 +0000 (13:17 -0500)]
testsuite: Fix notify tests
GtkStatusIcon tests don't work well under xwayland either, so just
skip them unconditionally.
GtkEntry now fails because the update of the im-module is no longer
deferred to an idle, and (gtk-im-simple) is not a valid module
name, so skip this property.
Matthias Clasen [Fri, 4 Dec 2015 18:16:35 +0000 (13:16 -0500)]
shortcut label: Tweak modifier key rendering
The subscript was affecting the vertical alignment too much,
so tweak the rendering of the L/R markers to avoid that. Also,
mark these as translatable.
Matthias Clasen [Fri, 4 Dec 2015 18:13:38 +0000 (13:13 -0500)]
Add a css name to GtkShortcutsShortcut
This will be useful for tweaking the gesture image details,
among other things.
Lapo Calamandrei [Fri, 4 Dec 2015 18:04:17 +0000 (19:04 +0100)]
Adwaita: added back progressbar.osd style
Lapo Calamandrei [Fri, 4 Dec 2015 17:47:28 +0000 (18:47 +0100)]
Adwaita: fix scales with marks on the dark variant
Lapo Calamandrei [Fri, 4 Dec 2015 17:42:56 +0000 (18:42 +0100)]
Adwaita: slight color tweaks
Benjamin Otte [Fri, 4 Dec 2015 16:43:36 +0000 (17:43 +0100)]
reftests: Add test for missing-image handling
Add a test that ensures that missing images get the icon-effect properly
applied.
Benjamin Otte [Fri, 4 Dec 2015 16:42:35 +0000 (17:42 +0100)]
iconhelper: Fold function into callers
The function takes so many arguments and is so short that it's not worth
keeping.
Benjamin Otte [Fri, 4 Dec 2015 15:55:02 +0000 (16:55 +0100)]
iconhelper: Apply icon-effect directly
Instead of creating an icon source, making sure no state is set and
therefore the icon-effect will be applied and then rendering that icon
source, just call the icon-effect apply function.
Also, the new way isn't deprecated.
Benjamin Otte [Fri, 4 Dec 2015 15:53:50 +0000 (16:53 +0100)]
css: Leftover renaming gtk-image-effect => icon-effect
The previous renaming commit was incomplete, so here we go again.
Benjamin Otte [Fri, 4 Dec 2015 15:35:58 +0000 (16:35 +0100)]
render: Split out icon-effect apply function
Benjamin Otte [Fri, 4 Dec 2015 15:18:23 +0000 (16:18 +0100)]
iconhelper: Return surface from icon-effect function
All the callers where converting to a surface anyway.
Benjamin Otte [Fri, 4 Dec 2015 15:13:22 +0000 (16:13 +0100)]
iconhelper: Refactor missing icon handling
In particular, stop using deprecated code for loading the missing image
icon.
Benjamin Otte [Fri, 4 Dec 2015 15:06:08 +0000 (16:06 +0100)]
iconhelper: Fold function into only caller
Benjamin Otte [Fri, 4 Dec 2015 14:25:49 +0000 (15:25 +0100)]
iconfactory: Drop caching infrastructure
- icon sets are essentially unused
- the icon theme does caching
- this code complicates the restructuring I'm about to do
=> Delete it!
William Hua [Fri, 4 Dec 2015 16:17:43 +0000 (11:17 -0500)]
mir: remove deprecated function call
Matthias Clasen [Fri, 4 Dec 2015 15:55:20 +0000 (10:55 -0500)]
shortcuts: Extend the accelerator syntax more
Cover cases like left+right control, and render them nicely.
The gtk3-demo builder shortcuts example shows the new
possibilities.
Olivier Fourdan [Fri, 4 Dec 2015 10:25:50 +0000 (11:25 +0100)]
wayland: fix testtooltips
On Wayland, for tooltips to work as expected, the type hint must be set
to tooltips, otherwise the popup window won't be translated as a
subsurface.
Fix the test do work as expected under Wayland.
Bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=759018
Lionel Landwerlin [Wed, 2 Dec 2015 01:41:07 +0000 (01:41 +0000)]
gdkoffscreenwindow: use embedder to derive surfaces & scale factor
In Gdk, a GdkOffscreenWindow parent has to be the root window. This is
problematic on Wayland because the root window doesn't necessary have the
right information with regard to scale factor.
This patch proposes to rely on the embedder, if available, to derive
surfaces as well as getting the scale factor.
https://bugzilla.gnome.org/show_bug.cgi?id=758936
Timm Bäder [Thu, 3 Dec 2015 19:20:58 +0000 (20:20 +0100)]
GtkEntry: nullable annotations
Timm Bäder [Thu, 3 Dec 2015 18:32:56 +0000 (19:32 +0100)]
GtkEntry: Return proper constants from signal handlers
Timm Bäder [Thu, 3 Dec 2015 17:27:47 +0000 (18:27 +0100)]
GtkTreeModel: Remove erroneous transfer annotation
Timm Bäder [Thu, 3 Dec 2015 17:14:45 +0000 (18:14 +0100)]
GtkEntry: Remove recompute idle
Just do it directly
Timm Bäder [Thu, 3 Dec 2015 17:10:54 +0000 (18:10 +0100)]
GtkEntry: Remove unused fields
Lapo Calamandrei [Thu, 3 Dec 2015 18:28:57 +0000 (19:28 +0100)]
Adwaita: some OSD rationalization
taking care of https://bugzilla.gnome.org/show_bug.cgi?id=732528 in
the process, any toolbar.osd with a positional style class attached
gets squared corners now.
Lapo Calamandrei [Thu, 3 Dec 2015 17:39:19 +0000 (18:39 +0100)]
Adwaita: scale with marks styling
I'm really sorry for the unlucky ones who would have to read that
code...
Lapo Calamandrei [Thu, 3 Dec 2015 15:18:12 +0000 (16:18 +0100)]
Adwaita: added back scale marks style
Benjamin Otte [Thu, 3 Dec 2015 13:40:32 +0000 (14:40 +0100)]
tests: Rework some foreigndrawing code
Instead of specifying the full path everytime, just specify the parent
style context and then use its path.
Matthias Clasen [Thu, 3 Dec 2015 13:37:58 +0000 (08:37 -0500)]
Update gtk_drag_highlight() docs
What they said was no longer true.
Matthias Clasen [Thu, 3 Dec 2015 12:55:57 +0000 (07:55 -0500)]
Simplify foreign drawing example a bit
Lapo Calamandrei [Thu, 3 Dec 2015 11:18:17 +0000 (12:18 +0100)]
Adwaita: scale fill style
Sebastien Bacher [Wed, 2 Dec 2015 12:46:24 +0000 (13:46 +0100)]
GtkAppChooserWidget: wrap the label, use a standard icon
Let the label wrap if needed, that's required in some locales, use an
icon which is available in the theme
https://bugzilla.gnome.org/show_bug.cgi?id=758908
Lapo Calamandrei [Thu, 3 Dec 2015 10:43:53 +0000 (11:43 +0100)]
Adwaita: rename scale sass templates to be more specific
Lapo Calamandrei [Thu, 3 Dec 2015 10:38:50 +0000 (11:38 +0100)]
Adwaita: added back style for scales on selected list rows
Lapo Calamandrei [Wed, 2 Dec 2015 20:03:03 +0000 (21:03 +0100)]
Adwaita: first stab at GtkScale and GtkProgressBar rewrite
...scale has marks stuff missing, coming soon.
Benjamin Otte [Thu, 3 Dec 2015 09:36:14 +0000 (10:36 +0100)]
window: Deprecate gtk_window_resize_to_geometry()
And make it not do anything anymore.
Fixes erratic resizes of gnome-terminal.
https://bugzilla.gnome.org/show_bug.cgi?id=757282
Olivier Fourdan [Wed, 2 Dec 2015 10:15:39 +0000 (11:15 +0100)]
gtkwindow: Document further resize with csd
Applying the client-side decorations in the configure routine greatly
increases the chances of having the right size for the GtkHEaderBar and
border shadows.
Yet, it may be possible that these sizes change at a later point in
time, if for example the GtkHeaderBar grows in height while adding new
controls.
Mention this possible pitfall in the documentation for
gtk_window_resize().
https://bugzilla.gnome.org/show_bug.cgi?id=756618
Matthias Clasen [Thu, 3 Dec 2015 04:50:03 +0000 (23:50 -0500)]
entry: Use regular drag highlight
The entry code passes GTK_DEST_DEFAULT_HIGHLIGHT when setting
up the drop target, but that is ineffective because of the
custom drag_motion implementation. Instead, call
gtk_drag_[un]hightlight ourselves.
Matthias Clasen [Thu, 3 Dec 2015 04:49:07 +0000 (23:49 -0500)]
Use :dnd pseudoclass for drag highlighting
Instead of a ::draw handler with a hardcoded outline,
use CSS for drawing the highlight.
Matthias Clasen [Thu, 3 Dec 2015 04:23:36 +0000 (23:23 -0500)]
css: Add a :dnd pseudoclass
This will be used for drag highlighting.
Matthias Clasen [Thu, 3 Dec 2015 04:10:56 +0000 (23:10 -0500)]
Add a selected text example
Matthias Clasen [Thu, 3 Dec 2015 02:32:45 +0000 (21:32 -0500)]
Make foreign drawing example work
Set up multiple style contexts to get inheritance right.
Matthias Clasen [Wed, 2 Dec 2015 23:59:59 +0000 (18:59 -0500)]
Add another hand-drawn scrollbar
This one is supposed to show up in active state, but doesn't.
Matthias Clasen [Wed, 2 Dec 2015 23:46:54 +0000 (18:46 -0500)]
Add an example of foreign drawing
This uses the gtk_render apis with a style context constructed
from a style path.
Benjamin Otte [Wed, 2 Dec 2015 23:33:51 +0000 (00:33 +0100)]
css: Introduct -gtk-icon-palette
This borrows heavily from the CSS4 fonts draft's font-palette, currently
found at https://drafts.csswg.org/css-fonts-4/#font-palette-control
The palette is mainly meant to trigger invalidations when colors used for
symbolic icons change, to potentially allow extending supported colors
in symbolic icons and to recolor all colors of a symbolic icon, not just
the main one.
The syntax for the property goes like this:
Name: -gtk-icon-palette
Value: default | name <color> [ , name <color> ]*
Initial: default
Applies to: all elements with icons
Inherited: yes
Animatable: yes, each color animated separately
The property defines a list of named colors to be used when looking up
icons. If a name is not defined, the value of the current "color"
property is used. Which names are relevant depends on the icons in use.
Currently symbolic icons make use of the names "success", "warning" and
"error".
"default" is the current behavior of the GTK when coloring symbolic
icons and is equal to the string
success @success_color, warning @warning_color, error @error_color
Animation is crudely implemented by animating colors that are in both
palettes that are animated and otherwise keeping the color from the
palette that defined it. Note that this can cause a sharp cut at the
beginning or end of the animation when the color goes away and will
therefore be replaced with the color property.
You can see an example of animations at
http://gfycat.com/CautiousPeacefulIaerismetalmark
Daniel Mustieles [Wed, 2 Dec 2015 20:08:41 +0000 (21:08 +0100)]
Updated Spanish translation
Timm Bäder [Wed, 2 Dec 2015 19:58:58 +0000 (20:58 +0100)]
GtkRange: Return proper constants in signal handlers
Timm Bäder [Wed, 2 Dec 2015 19:43:17 +0000 (20:43 +0100)]
GtkRange: Remove recalc_marks field
And instead recalculate the marks on demand, i.e. whenever we were
previously setting recalc_marks to TRUE.
Timm Bäder [Wed, 2 Dec 2015 19:12:01 +0000 (20:12 +0100)]
GtkRange: Use G_MININT as default mouse position, not -1
Otherwise we're getting MOUSE_WIDGET as mouse position for unmapped
GtkRanges.
Timm Bäder [Wed, 2 Dec 2015 10:19:48 +0000 (11:19 +0100)]
GtkScale: Add missing nullable annotations
Lapo Calamandrei [Wed, 2 Dec 2015 16:42:42 +0000 (17:42 +0100)]
Adwaita: button.color fix
border-radius: 0 for colorswatch overlay as well.
Lapo Calamandrei [Wed, 2 Dec 2015 16:02:58 +0000 (17:02 +0100)]
Adwaita: vertically linked insensitive entries
Brighter border in that case as well.
Benjamin Otte [Wed, 2 Dec 2015 14:40:44 +0000 (15:40 +0100)]
dnd: Add gtk_image_set_from_definition()
... and use it in the DND code, thereby getting rid of the icon helper.
Benjamin Otte [Wed, 2 Dec 2015 14:22:23 +0000 (15:22 +0100)]
dnd: No need to reset the icon
When we start a drag cancel animation, we can just keep the existing
window. The reset was only necessary to convert from cursor icon to
window and we removed the cursor handling.
Benjamin Otte [Wed, 2 Dec 2015 13:56:15 +0000 (14:56 +0100)]
image: Remove unused code
I wonder how long that stuff has existed and not been used...
Benjamin Otte [Wed, 2 Dec 2015 13:54:15 +0000 (14:54 +0100)]
image: Split out a function
Krzesimir Nowak [Wed, 2 Dec 2015 11:29:58 +0000 (12:29 +0100)]
imagedefinition: Assert when trying to free empty definition
Empty definitions are not allocated on a heap, so doing a g_free() on
it would crash anyway.
Krzesimir Nowak [Tue, 17 Nov 2015 09:00:23 +0000 (10:00 +0100)]
cssprovider: Pass NULL unconditionally
We know that parent is NULL at this point.
Also, fix indentation.
Olivier Fourdan [Wed, 25 Nov 2015 14:30:52 +0000 (15:30 +0100)]
gtkwindow: apply CSD in configure size request
Just like we did for the default size, that reduces the chances of
having the headerbar missing or wrongly sized when computing the client
side decorations controls.
https://bugzilla.gnome.org/show_bug.cgi?id=756618
Matthias Clasen [Wed, 2 Dec 2015 06:07:02 +0000 (01:07 -0500)]
popover: Make position property not CONSTRUCT
There is no good reason for it, and it causes problems
with widget templates.
Matthias Clasen [Wed, 2 Dec 2015 06:03:35 +0000 (01:03 -0500)]
popover: Port to g_object_install_properties
And use the pspecs for notification.
Matthias Clasen [Wed, 2 Dec 2015 05:51:47 +0000 (00:51 -0500)]
dnd: Drop an unused argument
Matthias Clasen [Wed, 2 Dec 2015 05:48:37 +0000 (00:48 -0500)]
dnd: Some simplifications
We can now use a GtkImage instead of toplevel with
a custom draw callback and a specially prepared cairo
pattern.
Matthias Clasen [Wed, 2 Dec 2015 05:47:53 +0000 (00:47 -0500)]
Drop gdk_wayland_drag_context_get_dnd_window
This backend-specific and libgtk-only API is now unused,
so drop it.
Matthias Clasen [Wed, 2 Dec 2015 05:03:11 +0000 (00:03 -0500)]
dnd: Prevent black background in icons
Matthias Clasen [Wed, 2 Dec 2015 03:52:28 +0000 (22:52 -0500)]
DND: Drop support for using rgba cursors as icons
This adds a lot of complication to the code, and is not really
a big win, since still need to support icon windows anyway.
Matthias Clasen [Tue, 1 Dec 2015 15:34:26 +0000 (10:34 -0500)]
dnd: Fix issues with drag icons under Wayland
The Wayland dnd surface must remain in place until the drag
is over. Setting it directly as the hardcoded window of the
widget we construct carries the danger that it might get
destroyed prematurely, e.g. when the application calls
gtk_drag_set_icon_name more than once and we recreate the
widget.
Instead, create a dedicated toplevel, and reparent the widget
into it. To keep the code simple, we use the same approach
under X11 as well, and make it the responsibility of the
GDK dnd code to keep the window position updated. We already
pass the current pointer position to gdk_drag_motion, which
makes this very easy.
As a side-effect of these changes, it is now possible to use
non-toplevel widgets as drag icons.
https://bugzilla.gnome.org/show_bug.cgi?id=748763